import React from 'react'
import Header from '../common/header/index.jsx'
import store from '../store/index.js'
import { Provider } from 'react-redux'
import { HashRouter, Route, Switch } from 'react-router-dom'

// 引入组件
import Home from './Home/Home.jsx'
import Detail from './Detail/Detail.jsx'

export default class App extends React.Component{
  constructor(props){
    super(props)
    this.state = {}
  }
  render(){
    return (
      <Provider store={store}>
        <div>
          <Header></Header>
          <HashRouter>
              <Route path="/" exact component={Home}></Route>
              <Route path="/detail" exact component={Detail}></Route>
          </HashRouter>
        </div>
      </Provider>
    )
  }
}